package structure.bridge;

public abstract class Shape {
	//抽象对外的暴露，DrawApi 是真正需要实现的方法
	protected DrawApi drawApi;
	
	public Shape(DrawApi drawApi){
		this.drawApi = drawApi;
	}

	abstract public void draw();
}

/**
 * 虽然继承了，但是没有真正实现
 */
class Circle extends Shape {
	private final int x;
	private final int y;
	private final int redius;

	public Circle(DrawApi drawApi,int x,int y,int radius) {
		super(drawApi);
		this.x = x;
		this.y = y;
		this.redius = radius;
	}
	@Override
	public void draw() {
		drawApi.drawCircle(redius, x, y);
	}
}
